package com.example.administrator.shzs.parse;

import com.alibaba.fastjson.JSON;
import com.example.administrator.shzs.entity.CollectShopData.ListBean;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.List;

/**
 * 解析关注的商家列表
 */
public class ParseCollectShopList {


    public static List<ListBean> getCollectShopList(String result) throws JSONException {

        List<ListBean> listBeens;

        JSONObject obj=new JSONObject(result);

        JSONArray array = obj.getJSONArray("list");

        listBeens= JSON.parseArray(array.toString(),ListBean.class);

        return listBeens;
    }
}
